// 登录相关
export const useLogin = defineStore({
  id: 'login',
  state: () => {
    return {
      isLogin: false,
    }
  },
  actions: {
    async loginRequest(name: string) {
      const data = await loginAsync()
      data && (this.isLogin = true)
    },
  },
})

// 模拟一下
function loginAsync() {
  return Promise.resolve({
    data: 'Token',
  })
}
